package org.example.functions;

import javafx.util.Pair;
import org.example.Parent.realInstrument;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Calendar;
import java.util.TimeZone;

public class Clock02 extends realInstrument {
    public Clock02(double data, String path, Mode op, int n) {
        super(data, path, op, n);
        new Timer(500, new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                updateData();
                Clock02.super.repaint();
            }
        }).start();
    }

    @Override
    public void updateData() {
//        Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("Asia/Shanghai"));
//        super.data = calendar.get(Calendar.SECOND);
    }
}
